package com.hbsx.why.utils.refresh;

import com.hbsx.why.R;

/**
 * Created by liub on 2017/7/4 12:08.
 */

public class RefreshUtil {
    public static void changeRefreshLableImg(PullToRefreshLayout pullToRefreshLayout) {
        pullToRefreshLayout.setShowRefreshResultEnable(true);
        pullToRefreshLayout.setResourceConfig(new ResourceConfig() {
            @Override
            public int[] configImageResIds() {
                return new int[]{R.mipmap.ic_arrow, R.mipmap.ic_ok,
                        R.mipmap.ic_failed, R.mipmap.ic_ok, R.mipmap.ic_failed};
            }

            @Override
            public int[] configTextResIds() {
                return new int[]{R.string.pull_to_refresh, R.string.release_to_refresh, R.string.refreshing,
                        R.string.refresh_succeeded, R.string.refresh_failed, R.string.pull_up_to_load,
                        R.string.release_to_load, R.string.loading, R.string.load_succeeded,
                        R.string.load_failed};
            }
        });
    }
}
